﻿using __Able.Network;
using __Able.Network.Packets;
using __Able.Network.Utils;

namespace __Able.Network.ReplyPacket
{
    public class KeepAliveReplyPacket : _BasicOutPacket
    {
        public const ushort COMMAND = 0x0001;

        private User user;

        public KeepAliveReplyPacket(User user)
            : base(COMMAND, true, user)
        {
            this.user = user;
        }

        public KeepAliveReplyPacket(ByteBuffer buf, int length, User user) : base(buf, length, user) { }

        public override string PacketName
        {
            get
            {
                return "KeepAliveReplyPacket";
            }
        }

        protected override void PutBody(ByteBuffer buf)
        {
            buf.Put(Util.GetBytes(user.ID.ToString()));
        }

    }
}
